package org.dynasty.dynamic.scanner;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Update;

/**
 * 对BaseMapper做一些扩展
 * @author dynasty yq.xiong0320@gmail.com
 * @version 1.0
 * @date 2021/9/2 10:54
 */
public interface CustomizedBaseMapper<T> extends BaseMapper<T> {

    /**
     * 针对当前session关闭binlog记录
     */
    @Update("SET sql_log_bin = 0;")
    void deactivateBinlog();

    /**
     * 针对当前session开启binlog记录
     */
    @Update("SET sql_log_bin = 1;")
    void activateBinlog();

}
